import React from 'react'
import Test from './test'

export default class News extends React.Component {
  state = {
    val: 1
  }
  render() {
    return (
      <div>
        <h2 onClick={()=>this.setState({val: 2})}>我是news组件</h2>
        <Test val={this.state.val}/>
      </div>
    )
  }
}